<div ng-controller="OrderCtrl" ng-init="manualorderlistAction()">
    <ul class="sui-breadcrumb">
        <li>
            <a href="#/order/manualorderlist">{{ "快速下单" | translate }}</a>
        </li>
        <li class="active">
            {{ "List" | translate }}
            <a href="#/order/manualorder" id="addNew" class="sui-btn btn-primary">+{{ "新建快速下单" | translate }}</a>
            <a href="#/order/manualorderimport" class="sui-btn btn-primary">+{{"导入" | translate}}</a>
        </li>
        <span class="sui-form sui-form pull-right">
        </span>
    </ul>

    <span>选择小程序:
        <wx-app-list ng-model="wxappid" dft="1" ary="storeary" storedata="1">
        </wx-app-list>
    </span>

    <div class="sui-row-fluid" style="margin-top: 10px;">
        <table class="sui-table table-bordered">
            <thead>
                <tr>
                    <th>{{'#'|translate}}</th>
                    <th>{{'编号'|translate}}</th>
                    <th>{{'场景值'|translate}}</th>
                    <th>{{'订单数据'|translate}}</th>
                    <th>{{'operation'|translate}}</th>
                </tr>
            </thead>
            <tbody>
                <tr ng-repeat="(key, list) in quickorderslist">
                    <td>
                        <input type="checkbox" name="sjmodel" checklist-model="$parent.sjmodel" checklist-value="list" />
                    </td>
                    <td>{{list.quick_order_id}}</td>
                    <td>
                        {{list.scene}}<br />

                        <div class="sui-msg msg-error" ng-show="list.status == 1">
                            <div class="msg-con">未下单</div>
                            <s class="msg-icon"></s>
                        </div>
                        <div class="sui-msg msg-success" ng-show="list.status == 2">
                            <div class="msg-con">已下单</div>
                            <s class="msg-icon"></s>
                        </div>
                    </td>
                    <td>
                        名称：{{list.scene_data.address_data.real_name}} <br /> 收货地址：{{list.scene_data.address_data.province}} {{list.scene_data.address_data.city}} {{list.scene_data.address_data.district}} {{list.scene_data.address_data.address}}<br />
                        <table class="sui-table table-bordered">
                            <tr>
                                <td>商品标题</td>
                                <td>商品价格</td>
                                <td>购买数量</td>
                            </tr>
                            <tr ng-repeat="item in list.scene_data.item_data">
                                <td>
                                    {{item.title}}
                                </td>
                                <td>
                                    {{item.sku_price}}
                                </td>
                                <td>
                                    {{item.num}}
                                </td>
                            </tr>
                        </table>
                    </td>
                    <td>
                        <button class="sui-btn btn-primary" ng-click="wxcallback(list.scene);">
                            生成二维码
                        </button>
                        <button class="sui-btn btn-danger" ng-click="delQuickOrder(list.scene);">
                            删除
                        </button>
                    </td>
                </tr>
            </tbody>
        </table>
        <!-- 分页start -->
        <pager page-no="{{pageNo}}" page-size="pageSize" total="quickorderTotal" get-data="getquickorderList(pageNo)"></pager>
    </div>

    <span ng-show="quickorderslist.length">
        <button ng-click="quickCheckAll()" class="sui-btn btn-success">
            全选
        </button>
        <button ng-click="quickNoCheckAll()" class="sui-btn btn-success">
            反选
        </button>
    </span>
    <span ng-show="sjmodel.length">    
        <button type="button" class="sui-btn btn-danger"  ng-click="delAllOrder()">
            {{ "批量删除本页订单" | translate }}
        </button>
    </span>
</div>